﻿
/*
'===============================================================================
'  Generated From - CSharp_dOOdads_BusinessEntity.vbgen
' 
'  ** IMPORTANT  ** 
'  How to Generate your stored procedures:
' 
'  SQL        = SQL_StoredProcs.vbgen
'  ACCESS     = Access_StoredProcs.vbgen
'  ORACLE     = Oracle_StoredProcs.vbgen
'  FIREBIRD   = FirebirdStoredProcs.vbgen
'  POSTGRESQL = PostgreSQL_StoredProcs.vbgen
'
'  The supporting base class OleDbEntity is in the Architecture directory in "dOOdads".
'  
'  This object is 'abstract' which means you need to inherit from it to be able
'  to instantiate it.  This is very easilly done. You can override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  NEVER EDIT THIS FILE.
'
'  public class YourObject :  _YourObject
'  {
'
'  }
'
'===============================================================================
*/

// Generated by MyGeneration Version # (1.2.0.7)

using System;
using System.Data;
using System.Data.OleDb;
using System.Collections;
using System.Collections.Specialized;

using MyGeneration.dOOdads;

namespace pub.sup
{
	public abstract class _Content : OleDbEntity
	{
		public _Content()
		{
			this.QuerySource = "Content";
			this.MappingName = "Content";

		}	

		//=================================================================
		//  public Overrides void AddNew()
		//=================================================================
		//
		//=================================================================
		public override void AddNew()
		{
			base.AddNew();
			
		}
		
		
		public override string GetAutoKeyColumn()
		{
			return "ID";
		}

		public override void FlushData()
		{
			this._whereClause = null;
			this._aggregateClause = null;
			base.FlushData();
		}
		
		//=================================================================
		//  	public Function LoadAll() As Boolean
		//=================================================================
		//  Loads all of the records in the database, and sets the currentRow to the first row
		//=================================================================
		public bool LoadAll() 
		{
			ListDictionary parameters = null;
			
			return base.LoadFromSql("[" + this.SchemaStoredProcedure + "proc_ContentLoadAll]", parameters);
		}
	
		//=================================================================
		// public Overridable Function LoadByPrimaryKey()  As Boolean
		//=================================================================
		//  Loads a single row of via the primary key
		//=================================================================
		public virtual bool LoadByPrimaryKey(int ID)
		{
			ListDictionary parameters = new ListDictionary();
			parameters.Add(Parameters.ID, ID);

		
			return base.LoadFromSql("[" + this.SchemaStoredProcedure + "proc_ContentLoadByPrimaryKey]", parameters);
		}
		
		#region Parameters
		protected class Parameters
		{
			
			public static OleDbParameter ID
			{
				get
				{
					return new OleDbParameter("@ID", OleDbType.Numeric, 0);
				}
			}
			
			public static OleDbParameter 已采
			{
				get
				{
					return new OleDbParameter("@已采", OleDbType.Boolean, 2);
				}
			}
			
			public static OleDbParameter 已发
			{
				get
				{
					return new OleDbParameter("@已发", OleDbType.Boolean, 2);
				}
			}
			
			public static OleDbParameter 标题
			{
				get
				{
					return new OleDbParameter("@标题", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 当前位置
			{
				get
				{
					return new OleDbParameter("@当前位置", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 价格
			{
				get
				{
					return new OleDbParameter("@价格", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 单位
			{
				get
				{
					return new OleDbParameter("@单位", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 属性
			{
				get
				{
					return new OleDbParameter("@属性", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 详情情况
			{
				get
				{
					return new OleDbParameter("@详情情况", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 所属公司ID
			{
				get
				{
					return new OleDbParameter("@所属公司ID", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 关键字
			{
				get
				{
					return new OleDbParameter("@关键字", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 图片1
			{
				get
				{
					return new OleDbParameter("@图片1", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 所在地
			{
				get
				{
					return new OleDbParameter("@所在地", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 品牌
			{
				get
				{
					return new OleDbParameter("@品牌", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 缩略图
			{
				get
				{
					return new OleDbParameter("@缩略图", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter PageUrl
			{
				get
				{
					return new OleDbParameter("@PageUrl", OleDbType.LongVarWChar, 0);
				}
			}
			
			public static OleDbParameter 处理中
			{
				get
				{
					return new OleDbParameter("@处理中", OleDbType.Boolean, 2);
				}
			}
			
		}
		#endregion		
	
		#region ColumnNames
		public class ColumnNames
		{  
            public const string ID = "ID";
            public const string 已采 = "已采";
            public const string 已发 = "已发";
            public const string 标题 = "标题";
            public const string 当前位置 = "当前位置";
            public const string 价格 = "价格";
            public const string 单位 = "单位";
            public const string 属性 = "属性";
            public const string 详情情况 = "详情情况";
            public const string 所属公司ID = "所属公司ID";
            public const string 关键字 = "关键字";
            public const string 图片1 = "图片1";
            public const string 所在地 = "所在地";
            public const string 品牌 = "品牌";
            public const string 缩略图 = "缩略图";
            public const string PageUrl = "PageUrl";
            public const string 处理中 = "处理中";

			static public string ToPropertyName(string columnName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[ID] = _Content.PropertyNames.ID;
					ht[已采] = _Content.PropertyNames.已采;
					ht[已发] = _Content.PropertyNames.已发;
					ht[标题] = _Content.PropertyNames.标题;
					ht[当前位置] = _Content.PropertyNames.当前位置;
					ht[价格] = _Content.PropertyNames.价格;
					ht[单位] = _Content.PropertyNames.单位;
					ht[属性] = _Content.PropertyNames.属性;
					ht[详情情况] = _Content.PropertyNames.详情情况;
					ht[所属公司ID] = _Content.PropertyNames.所属公司ID;
					ht[关键字] = _Content.PropertyNames.关键字;
					ht[图片1] = _Content.PropertyNames.图片1;
					ht[所在地] = _Content.PropertyNames.所在地;
					ht[品牌] = _Content.PropertyNames.品牌;
					ht[缩略图] = _Content.PropertyNames.缩略图;
					ht[PageUrl] = _Content.PropertyNames.PageUrl;
					ht[处理中] = _Content.PropertyNames.处理中;

				}
				return (string)ht[columnName];
			}

			static private Hashtable ht = null;			 
		}
		#endregion
		
		#region PropertyNames
		public class PropertyNames
		{  
            public const string ID = "ID";
            public const string 已采 = "已采";
            public const string 已发 = "已发";
            public const string 标题 = "标题";
            public const string 当前位置 = "当前位置";
            public const string 价格 = "价格";
            public const string 单位 = "单位";
            public const string 属性 = "属性";
            public const string 详情情况 = "详情情况";
            public const string 所属公司ID = "所属公司ID";
            public const string 关键字 = "关键字";
            public const string 图片1 = "图片1";
            public const string 所在地 = "所在地";
            public const string 品牌 = "品牌";
            public const string 缩略图 = "缩略图";
            public const string PageUrl = "PageUrl";
            public const string 处理中 = "处理中";

			static public string ToColumnName(string propertyName)
			{
				if(ht == null)
				{
					ht = new Hashtable();
					
					ht[ID] = _Content.ColumnNames.ID;
					ht[已采] = _Content.ColumnNames.已采;
					ht[已发] = _Content.ColumnNames.已发;
					ht[标题] = _Content.ColumnNames.标题;
					ht[当前位置] = _Content.ColumnNames.当前位置;
					ht[价格] = _Content.ColumnNames.价格;
					ht[单位] = _Content.ColumnNames.单位;
					ht[属性] = _Content.ColumnNames.属性;
					ht[详情情况] = _Content.ColumnNames.详情情况;
					ht[所属公司ID] = _Content.ColumnNames.所属公司ID;
					ht[关键字] = _Content.ColumnNames.关键字;
					ht[图片1] = _Content.ColumnNames.图片1;
					ht[所在地] = _Content.ColumnNames.所在地;
					ht[品牌] = _Content.ColumnNames.品牌;
					ht[缩略图] = _Content.ColumnNames.缩略图;
					ht[PageUrl] = _Content.ColumnNames.PageUrl;
					ht[处理中] = _Content.ColumnNames.处理中;

				}
				return (string)ht[propertyName];
			}

			static private Hashtable ht = null;			 
		}			 
		#endregion	

		#region StringPropertyNames
		public class StringPropertyNames
		{  
            public const string ID = "s_ID";
            public const string 已采 = "s_已采";
            public const string 已发 = "s_已发";
            public const string 标题 = "s_标题";
            public const string 当前位置 = "s_当前位置";
            public const string 价格 = "s_价格";
            public const string 单位 = "s_单位";
            public const string 属性 = "s_属性";
            public const string 详情情况 = "s_详情情况";
            public const string 所属公司ID = "s_所属公司ID";
            public const string 关键字 = "s_关键字";
            public const string 图片1 = "s_图片1";
            public const string 所在地 = "s_所在地";
            public const string 品牌 = "s_品牌";
            public const string 缩略图 = "s_缩略图";
            public const string PageUrl = "s_PageUrl";
            public const string 处理中 = "s_处理中";

		}
		#endregion		
		
		#region Properties
	
		public virtual int ID
	    {
			get
	        {
				return base.Getint(ColumnNames.ID);
			}
			set
	        {
				base.Setint(ColumnNames.ID, value);
			}
		}

		public virtual bool 已采
	    {
			get
	        {
				return base.Getbool(ColumnNames.已采);
			}
			set
	        {
				base.Setbool(ColumnNames.已采, value);
			}
		}

		public virtual bool 已发
	    {
			get
	        {
				return base.Getbool(ColumnNames.已发);
			}
			set
	        {
				base.Setbool(ColumnNames.已发, value);
			}
		}

		public virtual string 标题
	    {
			get
	        {
				return base.Getstring(ColumnNames.标题);
			}
			set
	        {
				base.Setstring(ColumnNames.标题, value);
			}
		}

		public virtual string 当前位置
	    {
			get
	        {
				return base.Getstring(ColumnNames.当前位置);
			}
			set
	        {
				base.Setstring(ColumnNames.当前位置, value);
			}
		}

		public virtual string 价格
	    {
			get
	        {
				return base.Getstring(ColumnNames.价格);
			}
			set
	        {
				base.Setstring(ColumnNames.价格, value);
			}
		}

		public virtual string 单位
	    {
			get
	        {
				return base.Getstring(ColumnNames.单位);
			}
			set
	        {
				base.Setstring(ColumnNames.单位, value);
			}
		}

		public virtual string 属性
	    {
			get
	        {
				return base.Getstring(ColumnNames.属性);
			}
			set
	        {
				base.Setstring(ColumnNames.属性, value);
			}
		}

		public virtual string 详情情况
	    {
			get
	        {
				return base.Getstring(ColumnNames.详情情况);
			}
			set
	        {
				base.Setstring(ColumnNames.详情情况, value);
			}
		}

		public virtual string 所属公司ID
	    {
			get
	        {
				return base.Getstring(ColumnNames.所属公司ID);
			}
			set
	        {
				base.Setstring(ColumnNames.所属公司ID, value);
			}
		}

		public virtual string 关键字
	    {
			get
	        {
				return base.Getstring(ColumnNames.关键字);
			}
			set
	        {
				base.Setstring(ColumnNames.关键字, value);
			}
		}

		public virtual string 图片1
	    {
			get
	        {
				return base.Getstring(ColumnNames.图片1);
			}
			set
	        {
				base.Setstring(ColumnNames.图片1, value);
			}
		}

		public virtual string 所在地
	    {
			get
	        {
				return base.Getstring(ColumnNames.所在地);
			}
			set
	        {
				base.Setstring(ColumnNames.所在地, value);
			}
		}

		public virtual string 品牌
	    {
			get
	        {
				return base.Getstring(ColumnNames.品牌);
			}
			set
	        {
				base.Setstring(ColumnNames.品牌, value);
			}
		}

		public virtual string 缩略图
	    {
			get
	        {
				return base.Getstring(ColumnNames.缩略图);
			}
			set
	        {
				base.Setstring(ColumnNames.缩略图, value);
			}
		}

		public virtual string PageUrl
	    {
			get
	        {
				return base.Getstring(ColumnNames.PageUrl);
			}
			set
	        {
				base.Setstring(ColumnNames.PageUrl, value);
			}
		}

		public virtual bool 处理中
	    {
			get
	        {
				return base.Getbool(ColumnNames.处理中);
			}
			set
	        {
				base.Setbool(ColumnNames.处理中, value);
			}
		}


		#endregion
		
		#region String Properties
	
		public virtual string s_ID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.ID) ? string.Empty : base.GetintAsString(ColumnNames.ID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.ID);
				else
					this.ID = base.SetintAsString(ColumnNames.ID, value);
			}
		}

		public virtual string s_已采
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.已采) ? string.Empty : base.GetboolAsString(ColumnNames.已采);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.已采);
				else
					this.已采 = base.SetboolAsString(ColumnNames.已采, value);
			}
		}

		public virtual string s_已发
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.已发) ? string.Empty : base.GetboolAsString(ColumnNames.已发);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.已发);
				else
					this.已发 = base.SetboolAsString(ColumnNames.已发, value);
			}
		}

		public virtual string s_标题
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.标题) ? string.Empty : base.GetstringAsString(ColumnNames.标题);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.标题);
				else
					this.标题 = base.SetstringAsString(ColumnNames.标题, value);
			}
		}

		public virtual string s_当前位置
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.当前位置) ? string.Empty : base.GetstringAsString(ColumnNames.当前位置);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.当前位置);
				else
					this.当前位置 = base.SetstringAsString(ColumnNames.当前位置, value);
			}
		}

		public virtual string s_价格
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.价格) ? string.Empty : base.GetstringAsString(ColumnNames.价格);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.价格);
				else
					this.价格 = base.SetstringAsString(ColumnNames.价格, value);
			}
		}

		public virtual string s_单位
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.单位) ? string.Empty : base.GetstringAsString(ColumnNames.单位);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.单位);
				else
					this.单位 = base.SetstringAsString(ColumnNames.单位, value);
			}
		}

		public virtual string s_属性
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.属性) ? string.Empty : base.GetstringAsString(ColumnNames.属性);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.属性);
				else
					this.属性 = base.SetstringAsString(ColumnNames.属性, value);
			}
		}

		public virtual string s_详情情况
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.详情情况) ? string.Empty : base.GetstringAsString(ColumnNames.详情情况);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.详情情况);
				else
					this.详情情况 = base.SetstringAsString(ColumnNames.详情情况, value);
			}
		}

		public virtual string s_所属公司ID
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.所属公司ID) ? string.Empty : base.GetstringAsString(ColumnNames.所属公司ID);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.所属公司ID);
				else
					this.所属公司ID = base.SetstringAsString(ColumnNames.所属公司ID, value);
			}
		}

		public virtual string s_关键字
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.关键字) ? string.Empty : base.GetstringAsString(ColumnNames.关键字);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.关键字);
				else
					this.关键字 = base.SetstringAsString(ColumnNames.关键字, value);
			}
		}

		public virtual string s_图片1
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.图片1) ? string.Empty : base.GetstringAsString(ColumnNames.图片1);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.图片1);
				else
					this.图片1 = base.SetstringAsString(ColumnNames.图片1, value);
			}
		}

		public virtual string s_所在地
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.所在地) ? string.Empty : base.GetstringAsString(ColumnNames.所在地);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.所在地);
				else
					this.所在地 = base.SetstringAsString(ColumnNames.所在地, value);
			}
		}

		public virtual string s_品牌
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.品牌) ? string.Empty : base.GetstringAsString(ColumnNames.品牌);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.品牌);
				else
					this.品牌 = base.SetstringAsString(ColumnNames.品牌, value);
			}
		}

		public virtual string s_缩略图
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.缩略图) ? string.Empty : base.GetstringAsString(ColumnNames.缩略图);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.缩略图);
				else
					this.缩略图 = base.SetstringAsString(ColumnNames.缩略图, value);
			}
		}

		public virtual string s_PageUrl
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.PageUrl) ? string.Empty : base.GetstringAsString(ColumnNames.PageUrl);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.PageUrl);
				else
					this.PageUrl = base.SetstringAsString(ColumnNames.PageUrl, value);
			}
		}

		public virtual string s_处理中
	    {
			get
	        {
				return this.IsColumnNull(ColumnNames.处理中) ? string.Empty : base.GetboolAsString(ColumnNames.处理中);
			}
			set
	        {
				if(string.Empty == value)
					this.SetColumnNull(ColumnNames.处理中);
				else
					this.处理中 = base.SetboolAsString(ColumnNames.处理中, value);
			}
		}


		#endregion		
	
		#region Where Clause
		public class WhereClause
		{
			public WhereClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffWhereParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffWhereParameter(this);
					}

					return _tearOff;
				}
			}

			#region WhereParameter TearOff's
			public class TearOffWhereParameter
			{
				public TearOffWhereParameter(WhereClause clause)
				{
					this._clause = clause;
				}
				
				
				public WhereParameter ID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.ID, Parameters.ID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 已采
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.已采, Parameters.已采);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 已发
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.已发, Parameters.已发);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 标题
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.标题, Parameters.标题);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 当前位置
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.当前位置, Parameters.当前位置);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 价格
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.价格, Parameters.价格);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 单位
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.单位, Parameters.单位);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 属性
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.属性, Parameters.属性);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 详情情况
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.详情情况, Parameters.详情情况);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 所属公司ID
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.所属公司ID, Parameters.所属公司ID);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 关键字
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.关键字, Parameters.关键字);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 图片1
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.图片1, Parameters.图片1);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 所在地
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.所在地, Parameters.所在地);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 品牌
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.品牌, Parameters.品牌);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 缩略图
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.缩略图, Parameters.缩略图);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter PageUrl
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.PageUrl, Parameters.PageUrl);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}

				public WhereParameter 处理中
				{
					get
					{
							WhereParameter where = new WhereParameter(ColumnNames.处理中, Parameters.处理中);
							this._clause._entity.Query.AddWhereParameter(where);
							return where;
					}
				}


				private WhereClause _clause;
			}
			#endregion
		
			public WhereParameter ID
		    {
				get
		        {
					if(_ID_W == null)
	        	    {
						_ID_W = TearOff.ID;
					}
					return _ID_W;
				}
			}

			public WhereParameter 已采
		    {
				get
		        {
					if(_已采_W == null)
	        	    {
						_已采_W = TearOff.已采;
					}
					return _已采_W;
				}
			}

			public WhereParameter 已发
		    {
				get
		        {
					if(_已发_W == null)
	        	    {
						_已发_W = TearOff.已发;
					}
					return _已发_W;
				}
			}

			public WhereParameter 标题
		    {
				get
		        {
					if(_标题_W == null)
	        	    {
						_标题_W = TearOff.标题;
					}
					return _标题_W;
				}
			}

			public WhereParameter 当前位置
		    {
				get
		        {
					if(_当前位置_W == null)
	        	    {
						_当前位置_W = TearOff.当前位置;
					}
					return _当前位置_W;
				}
			}

			public WhereParameter 价格
		    {
				get
		        {
					if(_价格_W == null)
	        	    {
						_价格_W = TearOff.价格;
					}
					return _价格_W;
				}
			}

			public WhereParameter 单位
		    {
				get
		        {
					if(_单位_W == null)
	        	    {
						_单位_W = TearOff.单位;
					}
					return _单位_W;
				}
			}

			public WhereParameter 属性
		    {
				get
		        {
					if(_属性_W == null)
	        	    {
						_属性_W = TearOff.属性;
					}
					return _属性_W;
				}
			}

			public WhereParameter 详情情况
		    {
				get
		        {
					if(_详情情况_W == null)
	        	    {
						_详情情况_W = TearOff.详情情况;
					}
					return _详情情况_W;
				}
			}

			public WhereParameter 所属公司ID
		    {
				get
		        {
					if(_所属公司ID_W == null)
	        	    {
						_所属公司ID_W = TearOff.所属公司ID;
					}
					return _所属公司ID_W;
				}
			}

			public WhereParameter 关键字
		    {
				get
		        {
					if(_关键字_W == null)
	        	    {
						_关键字_W = TearOff.关键字;
					}
					return _关键字_W;
				}
			}

			public WhereParameter 图片1
		    {
				get
		        {
					if(_图片1_W == null)
	        	    {
						_图片1_W = TearOff.图片1;
					}
					return _图片1_W;
				}
			}

			public WhereParameter 所在地
		    {
				get
		        {
					if(_所在地_W == null)
	        	    {
						_所在地_W = TearOff.所在地;
					}
					return _所在地_W;
				}
			}

			public WhereParameter 品牌
		    {
				get
		        {
					if(_品牌_W == null)
	        	    {
						_品牌_W = TearOff.品牌;
					}
					return _品牌_W;
				}
			}

			public WhereParameter 缩略图
		    {
				get
		        {
					if(_缩略图_W == null)
	        	    {
						_缩略图_W = TearOff.缩略图;
					}
					return _缩略图_W;
				}
			}

			public WhereParameter PageUrl
		    {
				get
		        {
					if(_PageUrl_W == null)
	        	    {
						_PageUrl_W = TearOff.PageUrl;
					}
					return _PageUrl_W;
				}
			}

			public WhereParameter 处理中
		    {
				get
		        {
					if(_处理中_W == null)
	        	    {
						_处理中_W = TearOff.处理中;
					}
					return _处理中_W;
				}
			}

			private WhereParameter _ID_W = null;
			private WhereParameter _已采_W = null;
			private WhereParameter _已发_W = null;
			private WhereParameter _标题_W = null;
			private WhereParameter _当前位置_W = null;
			private WhereParameter _价格_W = null;
			private WhereParameter _单位_W = null;
			private WhereParameter _属性_W = null;
			private WhereParameter _详情情况_W = null;
			private WhereParameter _所属公司ID_W = null;
			private WhereParameter _关键字_W = null;
			private WhereParameter _图片1_W = null;
			private WhereParameter _所在地_W = null;
			private WhereParameter _品牌_W = null;
			private WhereParameter _缩略图_W = null;
			private WhereParameter _PageUrl_W = null;
			private WhereParameter _处理中_W = null;

			public void WhereClauseReset()
			{
				_ID_W = null;
				_已采_W = null;
				_已发_W = null;
				_标题_W = null;
				_当前位置_W = null;
				_价格_W = null;
				_单位_W = null;
				_属性_W = null;
				_详情情况_W = null;
				_所属公司ID_W = null;
				_关键字_W = null;
				_图片1_W = null;
				_所在地_W = null;
				_品牌_W = null;
				_缩略图_W = null;
				_PageUrl_W = null;
				_处理中_W = null;

				this._entity.Query.FlushWhereParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffWhereParameter _tearOff;
			
		}
	
		public WhereClause Where
		{
			get
			{
				if(_whereClause == null)
				{
					_whereClause = new WhereClause(this);
				}
		
				return _whereClause;
			}
		}
		
		private WhereClause _whereClause = null;	
		#endregion
	
		#region Aggregate Clause
		public class AggregateClause
		{
			public AggregateClause(BusinessEntity entity)
			{
				this._entity = entity;
			}
			
			public TearOffAggregateParameter TearOff
			{
				get
				{
					if(_tearOff == null)
					{
						_tearOff = new TearOffAggregateParameter(this);
					}

					return _tearOff;
				}
			}

			#region AggregateParameter TearOff's
			public class TearOffAggregateParameter
			{
				public TearOffAggregateParameter(AggregateClause clause)
				{
					this._clause = clause;
				}
				
				
				public AggregateParameter ID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.ID, Parameters.ID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 已采
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.已采, Parameters.已采);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 已发
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.已发, Parameters.已发);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 标题
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.标题, Parameters.标题);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 当前位置
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.当前位置, Parameters.当前位置);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 价格
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.价格, Parameters.价格);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 单位
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.单位, Parameters.单位);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 属性
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.属性, Parameters.属性);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 详情情况
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.详情情况, Parameters.详情情况);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 所属公司ID
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.所属公司ID, Parameters.所属公司ID);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 关键字
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.关键字, Parameters.关键字);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 图片1
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.图片1, Parameters.图片1);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 所在地
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.所在地, Parameters.所在地);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 品牌
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.品牌, Parameters.品牌);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 缩略图
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.缩略图, Parameters.缩略图);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter PageUrl
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.PageUrl, Parameters.PageUrl);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}

				public AggregateParameter 处理中
				{
					get
					{
							AggregateParameter aggregate = new AggregateParameter(ColumnNames.处理中, Parameters.处理中);
							this._clause._entity.Query.AddAggregateParameter(aggregate);
							return aggregate;
					}
				}


				private AggregateClause _clause;
			}
			#endregion
		
			public AggregateParameter ID
		    {
				get
		        {
					if(_ID_W == null)
	        	    {
						_ID_W = TearOff.ID;
					}
					return _ID_W;
				}
			}

			public AggregateParameter 已采
		    {
				get
		        {
					if(_已采_W == null)
	        	    {
						_已采_W = TearOff.已采;
					}
					return _已采_W;
				}
			}

			public AggregateParameter 已发
		    {
				get
		        {
					if(_已发_W == null)
	        	    {
						_已发_W = TearOff.已发;
					}
					return _已发_W;
				}
			}

			public AggregateParameter 标题
		    {
				get
		        {
					if(_标题_W == null)
	        	    {
						_标题_W = TearOff.标题;
					}
					return _标题_W;
				}
			}

			public AggregateParameter 当前位置
		    {
				get
		        {
					if(_当前位置_W == null)
	        	    {
						_当前位置_W = TearOff.当前位置;
					}
					return _当前位置_W;
				}
			}

			public AggregateParameter 价格
		    {
				get
		        {
					if(_价格_W == null)
	        	    {
						_价格_W = TearOff.价格;
					}
					return _价格_W;
				}
			}

			public AggregateParameter 单位
		    {
				get
		        {
					if(_单位_W == null)
	        	    {
						_单位_W = TearOff.单位;
					}
					return _单位_W;
				}
			}

			public AggregateParameter 属性
		    {
				get
		        {
					if(_属性_W == null)
	        	    {
						_属性_W = TearOff.属性;
					}
					return _属性_W;
				}
			}

			public AggregateParameter 详情情况
		    {
				get
		        {
					if(_详情情况_W == null)
	        	    {
						_详情情况_W = TearOff.详情情况;
					}
					return _详情情况_W;
				}
			}

			public AggregateParameter 所属公司ID
		    {
				get
		        {
					if(_所属公司ID_W == null)
	        	    {
						_所属公司ID_W = TearOff.所属公司ID;
					}
					return _所属公司ID_W;
				}
			}

			public AggregateParameter 关键字
		    {
				get
		        {
					if(_关键字_W == null)
	        	    {
						_关键字_W = TearOff.关键字;
					}
					return _关键字_W;
				}
			}

			public AggregateParameter 图片1
		    {
				get
		        {
					if(_图片1_W == null)
	        	    {
						_图片1_W = TearOff.图片1;
					}
					return _图片1_W;
				}
			}

			public AggregateParameter 所在地
		    {
				get
		        {
					if(_所在地_W == null)
	        	    {
						_所在地_W = TearOff.所在地;
					}
					return _所在地_W;
				}
			}

			public AggregateParameter 品牌
		    {
				get
		        {
					if(_品牌_W == null)
	        	    {
						_品牌_W = TearOff.品牌;
					}
					return _品牌_W;
				}
			}

			public AggregateParameter 缩略图
		    {
				get
		        {
					if(_缩略图_W == null)
	        	    {
						_缩略图_W = TearOff.缩略图;
					}
					return _缩略图_W;
				}
			}

			public AggregateParameter PageUrl
		    {
				get
		        {
					if(_PageUrl_W == null)
	        	    {
						_PageUrl_W = TearOff.PageUrl;
					}
					return _PageUrl_W;
				}
			}

			public AggregateParameter 处理中
		    {
				get
		        {
					if(_处理中_W == null)
	        	    {
						_处理中_W = TearOff.处理中;
					}
					return _处理中_W;
				}
			}

			private AggregateParameter _ID_W = null;
			private AggregateParameter _已采_W = null;
			private AggregateParameter _已发_W = null;
			private AggregateParameter _标题_W = null;
			private AggregateParameter _当前位置_W = null;
			private AggregateParameter _价格_W = null;
			private AggregateParameter _单位_W = null;
			private AggregateParameter _属性_W = null;
			private AggregateParameter _详情情况_W = null;
			private AggregateParameter _所属公司ID_W = null;
			private AggregateParameter _关键字_W = null;
			private AggregateParameter _图片1_W = null;
			private AggregateParameter _所在地_W = null;
			private AggregateParameter _品牌_W = null;
			private AggregateParameter _缩略图_W = null;
			private AggregateParameter _PageUrl_W = null;
			private AggregateParameter _处理中_W = null;

			public void AggregateClauseReset()
			{
				_ID_W = null;
				_已采_W = null;
				_已发_W = null;
				_标题_W = null;
				_当前位置_W = null;
				_价格_W = null;
				_单位_W = null;
				_属性_W = null;
				_详情情况_W = null;
				_所属公司ID_W = null;
				_关键字_W = null;
				_图片1_W = null;
				_所在地_W = null;
				_品牌_W = null;
				_缩略图_W = null;
				_PageUrl_W = null;
				_处理中_W = null;

				this._entity.Query.FlushAggregateParameters();

			}
	
			private BusinessEntity _entity;
			private TearOffAggregateParameter _tearOff;
			
		}
	
		public AggregateClause Aggregate
		{
			get
			{
				if(_aggregateClause == null)
				{
					_aggregateClause = new AggregateClause(this);
				}
		
				return _aggregateClause;
			}
		}
		
		private AggregateClause _aggregateClause = null;	
		#endregion
	
		protected override IDbCommand GetInsertCommand() 
		{
		
			OleDbCommand cmd = new OleDbCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_ContentInsert]";
	
			CreateParameters(cmd);
			    
			return cmd;
		}
	
		protected override IDbCommand GetUpdateCommand()
		{
		
			OleDbCommand cmd = new OleDbCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_ContentUpdate]";
	
			CreateParameters(cmd);
			      
			return cmd;
		}
	
		protected override IDbCommand GetDeleteCommand()
		{
		
			OleDbCommand cmd = new OleDbCommand();
			cmd.CommandType = CommandType.StoredProcedure;
			cmd.CommandText = "[" + this.SchemaStoredProcedure + "proc_ContentDelete]";
	
			OleDbParameter p;
			p = cmd.Parameters.Add(Parameters.ID);
			p.SourceColumn = ColumnNames.ID;
			p.SourceVersion = DataRowVersion.Current;

  
			return cmd;
		}
		
		private IDbCommand CreateParameters(OleDbCommand cmd)
		{
			OleDbParameter p;
		
			p = cmd.Parameters.Add(Parameters.ID);
			p.SourceColumn = ColumnNames.ID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.已采);
			p.SourceColumn = ColumnNames.已采;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.已发);
			p.SourceColumn = ColumnNames.已发;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.标题);
			p.SourceColumn = ColumnNames.标题;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.当前位置);
			p.SourceColumn = ColumnNames.当前位置;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.价格);
			p.SourceColumn = ColumnNames.价格;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.单位);
			p.SourceColumn = ColumnNames.单位;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.属性);
			p.SourceColumn = ColumnNames.属性;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.详情情况);
			p.SourceColumn = ColumnNames.详情情况;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.所属公司ID);
			p.SourceColumn = ColumnNames.所属公司ID;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.关键字);
			p.SourceColumn = ColumnNames.关键字;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.图片1);
			p.SourceColumn = ColumnNames.图片1;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.所在地);
			p.SourceColumn = ColumnNames.所在地;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.品牌);
			p.SourceColumn = ColumnNames.品牌;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.缩略图);
			p.SourceColumn = ColumnNames.缩略图;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.PageUrl);
			p.SourceColumn = ColumnNames.PageUrl;
			p.SourceVersion = DataRowVersion.Current;

			p = cmd.Parameters.Add(Parameters.处理中);
			p.SourceColumn = ColumnNames.处理中;
			p.SourceVersion = DataRowVersion.Current;


			return cmd;
		}
	}
}
